package com.ocom.company.feign;

import com.ocom.common.constant.HumanServiceUrl;
import com.ocom.common.entity.human.EntityDeptInfo;
import com.ocom.common.request.human.GetDeptByIdsRequest;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(value = "human")
public interface HumanClient {

    @PostMapping(HumanServiceUrl.URL_Department_GetDeptList)
    public Result<List<EntityDeptInfo>> getDeptList(@RequestParam("companyId") Long companyId, @RequestParam("deptId") Long deptId, @RequestParam("show") Integer show);

    @PostMapping(HumanServiceUrl.URL_getDeptById)
    public Result<EntityDeptInfo> getDeptById(@RequestBody EntityDeptInfo entityDeptInfo);

    @PostMapping(HumanServiceUrl.URL_getDeptByIds)
    public Result<List<EntityDeptInfo>> getDeptByIds(@RequestBody GetDeptByIdsRequest request);
}
